<!DOCTYPE html>
<html class="no-js" lang="">
<head>#include( "/public-head.html")</head>

<body style="background-color: #ffffff !important;">
	<div class="main-content checkbo">
		<div class="panel mb25">
			<div class="panel-heading border">修改字典</div>
			<div class="panel-body">
				<div class="row no-margin">
						<form action="/vrs/datadict/edit.jsn" id="dataDictForm" name="ajaxForm"
							class="form-horizontal bordered-group" role="form">
							<input type="hidden" name="dataDict.dataDictId" value="$!{dataDict.dataDictId}">
							<div class="form-group">
								<label class="col-sm-2 control-label">名称</label>
								<div class="col-sm-10">
									<input type="text" name="dataDict.name" value="$!{dataDict.name}" class="form-control w150" placeholder="名称">
								</div>
							</div>
                            <div class="form-group">
								<label class="col-sm-2 control-label">类型</label>
								<div class="col-sm-10">
									<select id="typeSelect" name="dataDict.type" data-placeholder="请选择类型" class="chosen w200" >
										#foreach( $row in $!{dataDictTypeMap.entrySet()})
	                                    	#if($row.key == $dataDict.type)
	                                    		<option value="$!{row.key}" selected="selected">$!{row.value}</option>
	                                    	#else
	                                    		<option value="$!{row.key}">$!{row.value}</option>
	                                    	#end
	                                    #end
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">状态</label>
								<div id="isendRadio" class="col-sm-10" >
									<label class="cb-radio">
	                                    <input type="radio" required name="dataDict.status" value="1" />生效
	                                </label>
	                                <label class="cb-radio">
	                                    <input type="radio" required name="dataDict.status" value="0" />失效
	                                </label>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">描述</label>
								<div class="col-sm-10">
									<input type="text" name="dataDict.description" value="$!{dataDict.description}" class="form-control w150" placeholder="描述">
								</div>
							</div>
							<div class="form-group">
								<label></label>
								<div >
									<button type="button" onclick="submitPerForm()" class="btn btn-primary mr10">保存</button>
									<button class="btn btn-default">返回</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>


	</div>
	<!-- /main area -->
	#include( "/public-script.html")
	#include( "/sub-script.html") 
	<script>
		initEditRadio('isendRadio','$!{dataDict.status}');
		//提交
		function submitPerForm() {
			if (!$('#dataDictForm').valid()) {
				return false;
			} else {
				$('#dataDictForm').submit();
			}
		}
	</script>
</body>

</html>
